package org.truenewx.tnxjee.repo.redis.support;

import java.io.Serializable;

import org.truenewx.tnxjee.model.entity.unity.Unity;
import org.truenewx.tnxjee.repo.cache.UnityCacheRepo;

/**
 * ForValue方式存储单体的Redis缓存仓库支持
 *
 * @param <T> 单体类型
 * @param <K> 单体标识类型
 */
public abstract class RedisUnityCacheRepoSupport<T extends Unity<K>, K extends Serializable>
        extends RedisEntityCacheRepoSupport<T, K> implements UnityCacheRepo<T, K> {

    @Override
    protected final K getKeyValue(T object) {
        return object.getId();
    }

}
